package com.ruoyi.system.service.impl;

import java.util.List;
import cn.hutool.core.util.ObjectUtil;
import com.ruoyi.common.constant.UserConstants;
import com.ruoyi.common.core.text.Convert;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.system.domain.vo.ADictAdvantageVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ADictAdvantageMapper;
import com.ruoyi.system.domain.ADictAdvantage;
import com.ruoyi.system.service.IADictAdvantageService;

/**
 * 字典房屋优势Service业务层处理
 *
 * @author system
 * @date 2024-11-23
 */
@Service
public class ADictAdvantageServiceImpl implements IADictAdvantageService {
    @Autowired
    private ADictAdvantageMapper aDictAdvantageMapper;

    /**
     * 查询字典房屋优势
     *
     * @param id 字典房屋优势主键
     * @return 字典房屋优势
     */
    @Override
    public ADictAdvantage selectADictAdvantageById(Long id) {
        return aDictAdvantageMapper.selectADictAdvantageById(id);
    }

    /**
     * 查询字典房屋优势列表
     *
     * @param aDictAdvantage 字典房屋优势
     * @return 字典房屋优势
     */
    @Override
    public List<ADictAdvantage> selectADictAdvantageList(ADictAdvantage aDictAdvantage) {
        return aDictAdvantageMapper.selectADictAdvantageList(aDictAdvantage);
    }

    /**
     * 新增字典房屋优势
     *
     * @param aDictAdvantage 字典房屋优势
     * @return 结果
     */
    @Override
    public int insertADictAdvantage(ADictAdvantage aDictAdvantage) {
        aDictAdvantage.setCreateTime(DateUtils.getNowDate());
        return aDictAdvantageMapper.insertADictAdvantage(aDictAdvantage);
    }

    /**
     * 修改字典房屋优势
     *
     * @param aDictAdvantage 字典房屋优势
     * @return 结果
     */
    @Override
    public int updateADictAdvantage(ADictAdvantage aDictAdvantage) {
        aDictAdvantage.setUpdateTime(DateUtils.getNowDate());
    return aDictAdvantageMapper.updateADictAdvantage(aDictAdvantage);
    }

    /**
     * 批量删除字典房屋优势
     *
     * @param ids 需要删除的字典房屋优势主键
     * @return 结果
     */
    @Override
    public int deleteADictAdvantageByIds(Long[] ids) {
        return aDictAdvantageMapper.deleteADictAdvantageByIds(ids);
    }

    /**
     * 删除字典房屋优势信息
     *
     * @param id 字典房屋优势主键
     * @return 结果
     */
    @Override
    public int deleteADictAdvantageById(Long id) {
        return aDictAdvantageMapper.deleteADictAdvantageById(id);
    }

    /**
     * 批量逻辑删除字典房屋优势
     *
     * @param ids 需要删除的字典房屋优势主键
     * @return 结果
     */
    @Override
    public int logicDeleteADictAdvantageByIds(Long[] ids) {
        return aDictAdvantageMapper.logicDeleteADictAdvantageByIds(ids);
    }
    /**
     * 逻辑删除字典房屋优势信息
     *
     * @param id 字典房屋优势主键
     * @return 结果
     */
    @Override
    public int logicDeleteADictAdvantageById(Long id) {
        return aDictAdvantageMapper.logicDeleteADictAdvantageById(id);
    }

    @Override
    public List<ADictAdvantage> selectADictAdvantageXcxList() {
        return aDictAdvantageMapper.selectADictAdvantageXcxList();
    }

    @Override
    public List<ADictAdvantage> selectADictAdvantageListLable() {
        return aDictAdvantageMapper.selectADictAdvantageListLable();
    }

}
